Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

eegbci api: allow downloading multiple subjects #12918

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

sappelhoff
Copy link
Member

I would be happy to receive some guidance on how to properly deprecate the subject parameter, the situation seems a bit tricky to me, given the mixture of positional parameters.

Comment on lines 97 to 99
subjects,
runs,
*,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For this I'd be tempted just to live with the misnomer subject=[...] rather than switch to subjects=[...] but the deprecation also won't be so terrible:

def load_data(
    subjects=None,
    runs=None,
    *,
    subject=None,
    ...
):
    if subject is not None:
        subjects = subjects
        warn(..., FutureWarning)
    del subject

And then you'll need to ensure that subjects and runs are not None, i.e., the user has actually supplied values for them (raise an error if None). Then once deprecation is complete we can remove the =None defaults safely.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants